tar-grind-file-mode fix.
authorUlrich Mueller <ulm@gentoo.org>
Fri, 21 Oct 2011 06:44:20 +0000 (23:44 -0700)
committerGlenn Morris <rgm@gnu.org>
Fri, 21 Oct 2011 06:44:20 +0000 (23:44 -0700)
* lisp/tar-mode.el (tar-grind-file-mode):
Fix handling of setuid/setgid, handle sticky bit.

lisp/ChangeLog
lisp/tar-mode.el

index d9e3006e40d91518830f40146d9d0a8866874e91..b195997d59d19ce009785accc9eaff4b9695fd36 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-21  Ulrich Mueller  <ulm@gentoo.org>
+
+       * tar-mode.el (tar-grind-file-mode):
+       Fix handling of setuid/setgid, handle sticky bit.  (Bug#9817)
+
 2011-10-21  Chong Yidong  <cyd@gnu.org>
 
        * progmodes/idlwave.el (idlwave-mode):
index 62171328979871aaea782bd46e7803fbadacb5e1..cfa406c2b48c2356523f8148cd19a65959f6c6d3 100644 (file)
@@ -404,13 +404,19 @@ MODE should be an integer which is a file mode value."
   (string
    (if (zerop (logand 256 mode)) ?- ?r)
    (if (zerop (logand 128 mode)) ?- ?w)
-   (if (zerop (logand 1024 mode)) (if (zerop (logand  64 mode)) ?- ?x) ?s)
+   (if (zerop (logand 2048 mode))
+       (if (zerop (logand  64 mode)) ?- ?x)
+     (if (zerop (logand  64 mode)) ?S ?s))
    (if (zerop (logand  32 mode)) ?- ?r)
    (if (zerop (logand  16 mode)) ?- ?w)
-   (if (zerop (logand 2048 mode)) (if (zerop (logand   8 mode)) ?- ?x) ?s)
+   (if (zerop (logand 1024 mode))
+       (if (zerop (logand   8 mode)) ?- ?x)
+     (if (zerop (logand   8 mode)) ?S ?s))
    (if (zerop (logand   4 mode)) ?- ?r)
    (if (zerop (logand   2 mode)) ?- ?w)
-   (if (zerop (logand   1 mode)) ?- ?x)))
+   (if (zerop (logand 512 mode))
+       (if (zerop (logand   1 mode)) ?- ?x)
+     (if (zerop (logand   1 mode)) ?T ?t))))
 
 (defun tar-header-block-summarize (tar-hblock &optional mod-p)
   "Return a line similar to the output of `tar -vtf'."